timezone_open
Alias for DateTimeZone::__construct - Create a new DateTimeZone object
timezone_open()
creates a new DateTimeZone object.
Create a new DateTimeZone object and return the name of the time zone:
<?php $tz = timezone_open ( "Asia/Shanghai" ) ; echo timezone_name_get ( $tz ) ; ?>
Try it yourself
timezone_open ( timezone ) ;
parameter | describe |
---|---|
timezone |
Required. Specify time zone. Tip: View a list of all time zones supported in PHP . |